<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<div align="center">main </div>
<div>
  <div align="right"><a href="#">退出</a></div>
</div>
welcome,${user.name }
<hr color="blue">
  <a href="${pageContext.request.contextPath }/messageServlet?opt=see">发帖</a>
  <hr color="red" >
  <table border="1" cellspacing="0" bordercolor="red" cellpadding="5">
  	<tr><td>ID</td><td>MSG</td><td>SENDER</td><td>RECEIVER</td><td>POSTTIME</td></tr>
  	<c:forEach items="${msgList }" var="msg">
  		<tr>
  			<td>${msg.id }</td>
  			<td>${msg.msg }</td>
  			<td>${msg.sender.name }</td>
  			<td>${msg.receiver.name }</td>
  			<td>${msg.posttime }</td>
  		</tr>
  	</c:forEach>
  </table>
</body>
</html>